<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>04固定定位</title>
    <style>
        header{
            width: 100%;
            height: 5%;
            background-color: red;
            position: fixed;
            top: 0;
            left: 0;
        }
        footer{
            width: 100%;
            height: 5%;
            background-color: #5bc0de;
            position: fixed;
            bottom: 0;
            left: 0;
        }
        nav{
            width: 30px;
            height: 60%;
            background-color: #5cb85c;
            position: fixed;
            left: 0;
            top: 20%;
        }
    </style>
</head>
<body>
    <header></header>
    <footer></footer>
    <nav></nav>
    <div id="d2">2</div>
    <img src="../html_02/img/wangye.jpg" alt="">
    <img src="../html_02/img/luqin.jpg" alt="">
    <img src="../html_02/img/baoer.jpg" alt="">
</body>
</html>